<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>USER TABLE</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<script type="text/javascript" src="../../js/jquery-3.1.1.min.js"></script>
<script type="text/html" id="barDemo">
		<a class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="vet">
	{{# if(d.isva=='未审核'){ }}
		<a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="vet">审核</a>
	{{# } else if(d.isva=='已审核'){}}
		<a class="layui-btn layui-btn-sm layui-btn-disabled">已审核</a>
	{{# } }}
</script>
<script type="text/html" id="imgTpl">
    <img src="../../{{ d.usersImage }}">
</script>
<script src="../../js/Verification.js"></script>
<script src="../../Res/LayUI/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/lobby/UserList.js"></script>
<script src="../../js/base.js"></script>
<link rel="stylesheet" href="../../Res/LayUI/css/layui.css" media="all">
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/lobby/UserList.css" media="all">

<style type="text/css">
img{
	width:40px;
	height: 40px;
}
.invisible {
  height: .5rem;
  top: .7rem;
}
.visible {
  height: .8rem;
  top: .55rem;
}
</style>
</head>
<body>
	<div class="demoTable">
	<input type="hidden" name="page" id="page">
	<input type="hidden" name="limit" id="limit">
		用户名：
		<div class="layui-inline">
			<input class="layui-input" id="name" name="usersName">
		</div>
		手机号：
		<div class="layui-inline">
			<input class="layui-input" id="phone" name="usersPhone" >
		</div>
	<button class="layui-btn" id="query">搜索</button>
	<button class="layui-btn layui-btn-primary" onclick="add();">添加</button>
	</div>
	<table id="showUser" class="layui-table"
		lay-data="{width: 790,url:'../../userAction/findAll.action', page:false, id:'idTest'}"
		lay-filter="demo">
		<thead>
			<tr>
				<th lay-data="{field:'usersName', width:90, align:'center'}">用户名</th>
				<th lay-data="{field:'usersPwd', width:80, align:'center'}">密码</th>
				<th lay-data="{field:'usersImage', width:130, align:'center',templet:'#imgTpl'}">头像</th>
				<th lay-data="{field:'usersPhone', width:90, align:'center'}">手机号</th>
				<th lay-data="{field:'usersCarid', width:135, align:'center'}">身份证号</th>
				<th lay-data="{field:'storeName', width:100, align:'center'}">餐店</th>
				<th lay-data="{field:'isva', width:150, align:'center'}">审核状态</th>
				<th lay-data="{field:'usersOptime', width:100, align:'center'}">操作时间</th>
				<th lay-data="{field:'usersOper', width:90, align:'center'}">操作人</th>
				<th lay-data="{fixed:'right', width:90, align:'center', toolbar: '#vet'}">审核</th>
				<th lay-data="{fixed:'right', width:120, align:'center', toolbar: '#barDemo'}">操作</th>
			</tr>
		</thead>
	</table>
	<ul class="pagination" id="pages">
    
	</ul>
	<div id="addReload">
 		<div id="addOperation">
		 	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
			  <legend>角色增加列表</legend>
			</fieldset>
			<form id="addMess" class="layui-form" action="../../userAction/addOrUpdate.action" method="post" enctype="multipart/form-data" >
			  <input type="hidden" id="addRoleIds" name="roleIds">
			  <div class="layui-form-item">
			    <label class="layui-form-label">用户名</label>
			    <div class="layui-input-block">
					<input type="text" name="usersName" id="userName" lay-verify="required" maxlength="20" placeholder="请输入名称" autocomplete="off" class="layui-input" style="width:280px;">
			    	<span id="falseName" class="errorMess"></span>
			    </div>
			  </div>
			  <div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">密码</label>
			    <div class="layui-input-block">
					<input type="password" name="usersPwd" id="userPwd" maxlength="20" placeholder="请输入密码" autocomplete="off" class="layui-input" style="width:280px;">
			    	<span id="falsePwd" class="errorMess"></span>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">手机号</label>
			    <div class="layui-input-block">
					<input type="text" name="usersPhone" id="userPhone" maxlength="20" placeholder="请输入手机号" autocomplete="off" class="layui-input" style="width:280px;">
			    	<span id="falsePhone" class="errorMess"></span>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">身份证</label>
			    <div class="layui-input-block">
					<input type="text" name="usersCarid" id="userCarid" maxlength="20" placeholder="请输入身份证" autocomplete="off" class="layui-input" style="width:280px;">
			    	<span id="falseCarid" class="errorMess"></span>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">头像</label>
			    <div class="layui-input-block">
					<input type="file" name="userImage" id="userImage" autocomplete="off">
			    	<span id="falsePicture" class="errorMess"></span>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">是否有效</label>
			    <div class="layui-input-block" style="width:200px;">
			      <select name="usersIsva" >
			          <option value="0" >是</option>
			          <option value="1" >否</option>
			        </select>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-inline">
			      <label class="layui-form-label">角色</label>
			      <div id="Addroles" class="layui-input-block" >
			      	
				  </div>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <input type="submit" id="add" class="layui-btn" value="提交">
			      <button id="closeAdd" type="reset" class="layui-btn layui-btn-primary" >取消</button>
			    </div>
			  </div>
		 </form>
	 </div>
 </div>
 <div id="updateReload">
 		<div id="updateOperation">
		 	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
			  <legend>用户修改列表</legend>
			</fieldset>
			<form id="updateMess" class="layui-form" action="../../userAction/addOrUpdate.action" method="post" enctype="multipart/form-data" >
			  <input type="hidden" name="usersId" id="usersId" >
			  <input type="hidden" id="fsId" name="fsId">
			  <input type="hidden" id="roleIds" name="roleIds">
			  <div class="layui-form-item">
			    <label class="layui-form-label">用户名</label>
			    <div class="layui-input-block">
			      <input type="text" name="usersName" id="usersName" lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input" style="width:280px;">
			    </div>
			  </div>
			  <div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">密码</label>
			    <div class="layui-input-block">
			      <input type="password" name="usersPwd" id="usersPwd" lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" style="width:280px;">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">手机号</label>
			    <div class="layui-input-block">
			      <input type="text" name="usersPhone" id="usersPhone" lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input" style="width:280px;">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">身份证</label>
			    <div class="layui-input-block">
			      <input type="text" name="usersCarid" id="usersCarid" lay-verify="required" placeholder="请输入身份证" autocomplete="off" class="layui-input" style="width:280px;">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">头像</label>
			    <div class="layui-input-block">
			      <input type="file" name="userImage" id="usersImage" lay-verify="required" autocomplete="off">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">是否有效</label>
			    <div class="layui-input-block" style="width:200px;">
			      <select name="usersIsva" id="usersIsva"   >
			          <option value="0" >是</option>
			          <option value="1" >否</option>
			        </select>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-inline">
			      <label class="layui-form-label">角色</label>
			      <div id="roles" class="layui-input-block" >
			      	
				  </div>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <input type="button" id="update" class="layui-btn"  value="提交">
			      <button id="closeUpdate" type="reset" class="layui-btn layui-btn-primary" >取消</button>
			    </div>
			  </div>
		 </form>
	 </div>
 </div>
</body>
</html>